<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
Person[] personList,personList1;
personList=(Person[])session.getAttribute("listPersons");
personList1=(Person[])session.getAttribute("listPersons1");
%>
<%@page import="com.beans.Person"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

</head>
<body>
<%@ include file="header.jsp" %>
<form id="listmemberForm" name="listmemberForm" method="POST" action="ListMemberServlet">
<div class="inputColumn" id="createAccount"
	style="text-align: center; border: thin; margin: auto;">
<table cellpadding="2" cellspacing="1" border="0" width="100%">
	<tr>
	<th colspan="2">
	<font size="2" color="red"><sup>*</sup> Required Fields</font></th>
	</tr>
	<tr>
	<td colspan="2">
	<% String serverException = (String)request.getAttribute("ServerMessage");
					if(serverException != null){
				%><br> <label style="size: 32; color: red"><%=serverException%></label> <%} %>
	</td>
	</tr>
	<tr>
	<td>
		<table  cellpadding="2" cellspacing="1" border="1" width="65%" style="background-color: rgb(254,252,180);">
			
			
			<thead> 
			<tr>
				<td valign="top" align="left">
				<b>List <sup style="color: red">*</sup></b></td><td valign="top" align="left">
				<select name="category" size="1" >
				<option value="1" selected >Premium Users</option>
				<option value="2" >Simple Users</option>
				<option value="3" >All Users</option>
				</select>
				</td>
			</tr>
			</thead>
			</table>
	<tr>
		<td align="center" colspan="2"><input type="submit" value="Search"> </td>
	</tr>
</table>
</div>
</form>
<form id="listForm" name="listForm">
<div class ="inputColumn" id = "CartItems" style="text-align: left; border: none; margin: auto;">	
				
			<table align="center" border="1" style="border-style: dashed; background-color: rgb(254,252,180);">
			<%
			if(personList != null)
			{
			%>
				<tr>
				<th align="center" style="color:red" bordercolor="red">MemshipNo</th>
				<th align="center" style="color:red" bordercolor="red">FirstName</th>
				<th align="center" style="color:red" bordercolor="red">LastName</th>
				<th align="center" style="color:red" bordercolor="red">Type</th>
				<th align="center" style="color:red" bordercolor="red">City</th>
				<th align="center" style="color:red" bordercolor="red">Email</th>
				</tr>
				<% 
				
				for(int i=0;i<personList.length;i++)
				{
				%>
				<tr bordercolor="black" >
				 
				  <td bordercolor="black">
					 	<label id ="name" style="size: 25;"><%=personList[i].getMemberShipNumber()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="LBanner" style="size: 25;"><%=personList[i].getFirstName()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="cname" style="size: 25;"><%=personList[i].getLastName() %> </label> 
					</td>
					<td bordercolor="black">
					 	<label id ="release" style="size: 25;"><%=personList[i].getCustomerType()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="rent" style="size: 25;"><%=personList[i].getCity() %></label> 
					</td>
					<td bordercolor="black">
						<label id="copy" style="size: 35;"><%=personList[i].getEmailId()   %></label>
					</td>
									
				</tr>
				<%
				}
			}
				if(personList1 != null)
				{
				
				for(int i=0;i<personList1.length;i++)
				{
				%>
				<tr bordercolor="black" >
				 
				  <td bordercolor="black">
					 	<label id ="name" style="size: 25;"><%=personList1[i].getMemberShipNumber()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="LBanner" style="size: 25;"><%=personList1[i].getFirstName()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="cname" style="size: 25;"><%=personList1[i].getLastName() %> </label> 
					</td>
					<td bordercolor="black">
					 	<label id ="release" style="size: 25;"><%=personList1[i].getCustomerType()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="rent" style="size: 25;"><%=personList1[i].getCity() %></label> 
					</td>
					<td bordercolor="black">
						<label id="copy" style="size: 35;"><%=personList1[i].getEmailId()   %></label>
					</td>
									
				</tr>
				<%
				}}
				%>
			</table>
			
	</div>
</form>
</body>
</html>